#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

#include "MSTK.h"

#ifdef __cplusplus
extern "C" {
#endif

MPI_Datatype PVertex_MPI,PFace_MPI;
  


void MESH_InitializeMPI(void) {
  /* construct derived datatype */
  MPI_Aint extent;
  MPI_Type_extent(MPI_DOUBLE,&extent);
  int counts[2] = {3,3};
  MPI_Aint offsets[2];
  offsets[0] = 0; offsets[1] = 3*extent;
  MPI_Datatype types[2] = {MPI_DOUBLE,MPI_INT};
  MPI_Type_create_struct(2,counts,offsets,types,&PVertex_MPI);
  MPI_Type_contiguous(12,MPI_INT,&PFace_MPI);
  /* commit to send */
  MPI_Type_commit(&PVertex_MPI);
  MPI_Type_commit(&PFace_MPI);
  
}
  
#ifdef __cplusplus
}
#endif

